package io.sage.modules.statistics.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import io.sage.modules.statistics.vo.BStatisVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import io.sage.modules.statistics.dao.BStatisticsPmTwoMapper;
import io.sage.modules.statistics.entity.BStatisticsPmTwo;
import io.sage.modules.statistics.service.BStatisticsPmTwoService;

/**
 * 传感器PM2.5服务
 * @author xjh
 *
 */
@Service("statisticsPmTwoService")
public class BStatisticsPmTwoServiceImpl implements BStatisticsPmTwoService {

	@Autowired
	private BStatisticsPmTwoMapper statisticsPmTwoMapper;

	@Override
	public BStatisticsPmTwo selectById(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void deleteBatchIds(List<Integer> asList) {
		// TODO Auto-generated method stub

	}

	@Override
	public List<BStatisticsPmTwo> selectStatisticsPmTwoList(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return statisticsPmTwoMapper.selectStatisticsPmTwoList(params);
	}

	@Override
	public int insert(BStatisticsPmTwo statisticsPmTwo) {
		statisticsPmTwo.setCreateTime(new Date());
		statisticsPmTwo.setIsDeleted(0);
		statisticsPmTwo.setIsUsed(1);
		return statisticsPmTwoMapper.insertSelective(statisticsPmTwo);
	}

	@Override
	public int saveHumidityList(List<BStatisticsPmTwo> list) {
		// TODO Auto-generated method stub
		return statisticsPmTwoMapper.savePmTwoList(list);
	}

	@Override
	public List<BStatisVo> selectListByWarehouseId(Map params) {
		return statisticsPmTwoMapper.selectListByWarehouseId(params);
	}

}
